package com.java01.apache.commons.io;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.IOException;

import org.apache.commons.io.IOUtils;

public class CopyTextFile {

	public static void main(String[] args) {
		File src = new File("D:/src.txt");
		File dest = new File("D:/dest.txt");
		
		try {
			IOUtils.copy(new FileReader(src), new FileOutputStream(dest),"BIG5");
		} catch (FileNotFoundException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
}
